package com.ruoyi.hualian.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hualian.mapper.HlKeywayMapper;
import com.ruoyi.hualian.domain.HlKeyway;
import com.ruoyi.hualian.service.IHlKeywayService;

/**
 * 键槽Service业务层处理
 * 
 * @author hujian
 */
@Service
public class HlKeywayServiceImpl implements IHlKeywayService 
{
    @Autowired
    private HlKeywayMapper hlKeywayMapper;

    /**
     * 根据已知信息查询具体对象信息
     * @param keywayName 已知信息
     * @return 具体对象信息
     */
    @Override
    public HlKeyway selectOne(String keywayName) {

        LambdaQueryWrapper<HlKeyway> HlKeywayWrapper = new LambdaQueryWrapper<>();

        HlKeywayWrapper.eq(HlKeyway::getKeywayName, keywayName);

        return hlKeywayMapper.selectOne(HlKeywayWrapper);
    }

    /**
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     */

    /**
     * 查询键槽
     * 
     * @param keywayId 键槽主键
     * @return 键槽
     */
    @Override
    public HlKeyway selectHlKeywayByKeywayId(Long keywayId)
    {
        return hlKeywayMapper.selectHlKeywayByKeywayId(keywayId);
    }

    /**
     * 查询键槽列表
     * 
     * @param hlKeyway 键槽
     * @return 键槽
     */
    @Override
    public List<HlKeyway> selectHlKeywayList(HlKeyway hlKeyway)
    {
        return hlKeywayMapper.selectHlKeywayList(hlKeyway);
    }

    /**
     * 新增键槽
     * 
     * @param hlKeyway 键槽
     * @return 结果
     */
    @Override
    public int insertHlKeyway(HlKeyway hlKeyway)
    {
        return hlKeywayMapper.insertHlKeyway(hlKeyway);
    }

    /**
     * 修改键槽
     * 
     * @param hlKeyway 键槽
     * @return 结果
     */
    @Override
    public int updateHlKeyway(HlKeyway hlKeyway)
    {
        return hlKeywayMapper.updateHlKeyway(hlKeyway);
    }

    /**
     * 批量删除键槽
     * 
     * @param keywayIds 需要删除的键槽主键
     * @return 结果
     */
    @Override
    public int deleteHlKeywayByKeywayIds(Long[] keywayIds)
    {
        return hlKeywayMapper.deleteHlKeywayByKeywayIds(keywayIds);
    }

    /**
     * 删除键槽信息
     * 
     * @param keywayId 键槽主键
     * @return 结果
     */
    @Override
    public int deleteHlKeywayByKeywayId(Long keywayId)
    {
        return hlKeywayMapper.deleteHlKeywayByKeywayId(keywayId);
    }
}
